*Replication File for the Participation Descriptive Statistics 

*Set working directory
cd "C:\Users\bened\Google Drive\Research Projects\Pedagogy Research Group\Remote Learning Experiment"

*Import Fall 2020 Descriptive Dataset
use "REPLICATION_Fall2020_Dataset.dta" 

tab Access_technology
tab Space_coursework
tab Timezone_impact
tab Prefer_remote

*Output of this command below (tab Connected_remote) is Fall 2020 column of Table 2, rounded to the nearest whole number
tab Connected_remote

tab Difficulty_attention
tab Anxious_remote
tab Anxious_questions
tab Age
tab Major
tab Year
tab Race_ethnicity
tab Caretaking_responsibilities
tab Caretaking_hoursperweek
tab Additional_employment
tab Additional_employment_hours
tab Gender

drop if Better_prepared== "NA"
*For the post-survey questions, we dropped students who didn't or couldn't complete the survey.

tab Better_prepared
tab Learn_easier
tab Asking_questions
tab Connected_group
tab Workedwell_group
tab Keepintouch_group
tab Time_consuming
tab Contributed_more
tab Credit_assigned
tab Already_know_group
tab Aware_other_groups

*Output of this command below (tab2 group Connected_group, row) produces data for Table 3, rounded to the nearest whole number, wherein group 1 is Buddy, group 2 is Student Zoom, group 3 is TA Zoom, Group 4 is Slack, and Group 5 is Discussion Board.
tab2 group Connected_group, row

*Regression code

encode group, generate(group_encoded)

generate buddy_treatment = .
generate studentzoom_treatment = .
generate tazoom_treatment = .
generate slack_treatment = .
generate discussiongroup_treatment = .

replace buddy_treatment =1 if group_encoded==1
replace studentzoom_treatment =1 if group_encoded==2
replace tazoom_treatment =1 if group_encoded==3
replace slack_treatment =1 if group_encoded==4
replace discussiongroup_treatment =1 if group_encoded==5

replace studentzoom_treatment =0 if studentzoom_treatment==.
replace tazoom_treatment =0 if tazoom_treatment==.
replace slack_treatment =0 if slack_treatment==.
replace discussiongroup_treatment =0 if discussiongroup_treatment==.
replace buddy_treatment =0 if buddy_treatment==.

encode Connected_group, generate(dv_encoded)
replace dv_encoded =. if dv_encoded==6


reg dv_encoded studentzoom_treatment
reg dv_encoded tazoom_treatment
reg dv_encoded slack_treatment
reg dv_encoded discussiongroup_treatment
reg dv_encoded buddy_treatment

clear 

*Import Spring 2021 Descriptive Dataset
use "REPLICATION_Spring_2021.dta" 

tab Access_technology
tab Space_coursework
tab Timezone_impact
tab Prefer_remote

*Output of this command below (tab Connected_remote) is Spring 2021 column of Table 2, rounded to the nearest whole number
tab Connected_remote


tab Difficulty_attention
tab Anxious_remote
tab Anxious_questions
tab Age
tab Major
tab Year
tab Race_ethnicity
tab Caretaking_responsibilities
tab Caretaking_hoursperweek
tab Additional_employment
tab Additional_employment_hours
tab Gender

drop if Asking_questions== "NA"
*For the post-survey questions, we dropped students who didn't or couldn't complete the survey.

tab Better_prepared
tab Learn_easier
tab Asking_questions
tab Connected_group
tab Workedwell_group
tab Keepintouch_group
tab Time_consuming
tab Contributed_more
tab Credit_assigned
tab Already_know_group
tab Aware_other_groups

clear 
